import {handler, view} from "adajs";
import LodgeService from "./state.js";
import TabWin from "./../../../controls/tab/win";
import Bar from "../../../controls/bar";
import Page from "./../../tabpage";

@view({
    className: "lodge",
    template: "./template.html",
    style: "./style.scss",
    dataset: {
        service: LodgeService
    }
})
class Lodge extends Page {
    tags() {
        return {
            tab: TabWin,
            bar: Bar
        }
    }

    @handler("bar-add")
    addmedical() {
        this.dispatchEvent("gotoPage", "/admin/medical/add");
    }

    @handler("bar-adde")
    addmedicale() {
        this.dispatchEvent("gotoPage", "/admin/medical/addhos");
    }
}

export default Lodge;